<?php

return CMap::mergeArray(
    require('main.php'), array(
    'name'   => 'Application',
    'import' => array(),
    'components' => array(
        'request' => array(
            'enableCsrfValidation'   => true,
            'enableCookieValidation' => false,
        ),
        'user' => array(
            'allowAutoLogin' => true,
            'stateKeyPrefix' => '_frontend',
        ),
        'urlManager'     => array(
            'rules' => array(
                'contact' => 'dfront/home/contact',
                'news' => 'dfront/news/index',
                'news/<action:(info|detail)>/<page>' => 'dfront/news/<action>',
                'news/cat/<var>' => 'dfront/news/cat',
                'home/detail/<page>' => 'dfront/home/detail',
                'doiNguBs' => 'dfront/doiNguBs/index',
                'doiNguBs/detail/<page>' => 'dfront/doiNguBs/detail',
                'services/<action:\w+>/*' => 'dfront/services/<action>',                
//                've-chung-toi' => 'dfront/news/aboutUs',
//                'products/<action:\w+>/*' => 'dfront/products/<action>',
//                'photo/detail/<var>' => 'dfront/photo/detail',
//                'photo/cat/<var>' => 'dfront/photo/cat',
//                'music' => 'dfront/music/index',
//                'music/album/<var>' => 'dfront/music/album',
//                'music/search' => 'dfront/music/search',
            ),
        ),
        'errorHandler'          => array(
            'errorAction' => 'dfront/default/error',
        ),
        'authManager' => array(
            'class'        => 'CDbAuthManager',
            'connectionID' => 'db',
        ),
        'log'          => array(
            'class'  => 'CLogRouter',
            'routes' => array(
                array(
                    'class'   => 'CFileLogRoute',
                    'levels'  => 'error, warning',
                ),
                array(
                    'class'   => 'CFileLogRoute',
                    'enabled' => true,
                    'levels'  => 'info',
                    'categories' => 'test-var-1',
                    'logFile' => 'test_var.html',
                ),
                array(
                    'class'   => 'CWebLogRoute',
                    'enabled' => true,
                    'levels'  => 'info',
                    'showInFireBug' => false,
                    'categories' => 'test-var-2',
                ),
            ),
        ),
        'session'     => array(
            'sessionName' => 'frontend',
            'autoStart'   => true,
            'timeout'     => 3600, // 1 hour
        ),
        'format' => array(
            'class' => 'application.components.Formatter',
        ),
    ),
    'modules' => array(
        'dfront',
    ),
    'defaultController' => 'dfront/home/index',
    'sourceLanguage'    => 'vi_vn',
    'language'          => 'vi',
    )
);
?>